import VueRouter from 'vue-router'

import index from './components/tabbars/index.vue'
import member from './components/tabbars/member.vue'
import cart from './components/tabbars/cart.vue'
import search from './components/tabbars/search.vue'

import newsList from './components/news/newsList.vue'
import newsInfo from './components/news/newsInfo.vue'
import photoList from './components/photos/photoList.vue'
import photoInfo from './components/photos/photoInfo.vue'
import goodsList from './components/goods/goodsList.vue'
import goodsInfo from './components/goods/goodsInfo.vue'
import goodsDescription from './components/goods/goodsDescription.vue'
import goodsComment from './components/goods/goodsComment.vue'


var router=new VueRouter({
    routes:[
        {path:'/',redirect:'/index'},
        {path:'/index',component:index},
        {path:'/member',component:member},
        {path:'/cart',component:cart},
        {path:'/search',component:search},
        {path:'/index/newsList',component:newsList},
        {path:'/index/newsInfo/:id',component:newsInfo,props:true},
        {path:'/index/photoList',component:photoList},
        {path:'/index/photoInfo/:id',component:photoInfo,props:true},
        {path:'/index/goodsList',component:goodsList},
        {path:'/index/goodsInfo/:id',component:goodsInfo,props:true},
        {path:'/index/goodsDescription/:id',component:goodsDescription,props:true},
        {path:'/index/goodsComment/:id',component:goodsComment,props:true}
    ],
    linkActiveClass:'mui-active'
})


export default router